/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package networkrespnse;

import core.ParameterDecoder;

import utils.Utils;
/**
 *
 * @author Kvest
 */
public class TaxiParkingsLastChangeDateResponse extends Response
{
    private long lastChange;
    
    public TaxiParkingsLastChangeDateResponse(byte[] data)
    {
        super(TAXI_PARKING_LAST_CHANGE_DATE_RESPONSE);
        lastChange = 0;

        parse(data);
    }

    
    protected void parse(byte[] data)
    {
        byte[] body,temp;
        int index;
        //��������  body
        body = ParameterDecoder.getTransferBody(data);
        //������������� ��������
        temp = new byte[4];
        index = 0;
        for (int i=0;i<4;i++)
        {
                temp[i] = body[index++];
        }
        index += Utils.byteToInt(temp);
        //�������� ��������
        temp = new byte[8];
        for (int i=0;i<8;i++)
        {
                temp[i] = body[index++];
        }
        lastChange = Utils.byteToDate(temp);
    }

    public long getLastChange()
    {
        return lastChange;
    }
}
